<%@ page contentType="text/html; charset=utf-8"%>
<%@include file="/common/taglibs.jsp"%>
	<script type="text/javascript" src="${ctx}/script/jquery/kvtableUI.js"></script>
	<script type="text/javascript">
	$().ready(function(){
		$.fn.kvtableUI.defaults.evenRowClass = "evenRow1";
		$(".table").kvtableUI();
	});
	</script>
	<style type="text/css">
	.evenRow1{background-color:#f0f0f0;}
	.activeRow1{background-color:#FFFF55;}
	</style>
	<form id="pagerForm" method="post" action="${ctx }/admin/articleinfo/showArticleInfoList.shtml">
		<input type="hidden" name="pageNum" value="1" />
		<input type="hidden" name="numPerPage" value="${param.numPerPage}" />
		<input type="hidden" name="status" value="${param.status}"/>
		<input type="hidden" name="keywords" value="${param.keywords}" />
		<input type="hidden" name="orderField" value="${param.orderField}" />
	</form>
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" rel="pagerForm" action="${ctx }/admin/articleinfo/showArticleInfoList.shtml" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						标题：<input type="text" name="title" value="${param.title}"/>
					</td>
					<td>
						<select class="combox" name="province">
							<option value="">所有省市</option>
							<option value="北京">北京</option>
							<option value="上海">上海</option>
							<option value="天津">天津</option>
							<option value="重庆">重庆</option>
							<option value="广东">广东</option>
						</select>
					</td>
					<td>
						创建日期：<input type="text" class="date" readonly="true" name="addDate" value="${param.addDate }"/>
					</td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
					<li><a class="button" href="${ctx }/jsp/back/demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
				</ul>
			</div>
		</div>
		</form>
	</div>
	<div class="pageContent">
		<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="${ctx }/admin/articleinfo/addArticleInfo.shtml" target="navTab" external="true" rel="artshow"><span>添加</span></a></li>
				<li><a class="delete" href="demo/common/ajaxDone.html?uid={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
				<li><a class="edit" href="${ctx }/admin/articleinfo/showArticleInfo.shtml?id={sid_user}&e=1" target="navTab" external="true" rel="artshow"><span>修改</span></a></li>
				<li class="line">line</li>
				<li><a class="icon" href="${ctx }/output/outExcel.shtml?t=articleinfo" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
			</ul>
		</div>
		<table class="table" width="100%" layoutH="144">
			<thead>
				<tr>
					<th width="80">编号</th>
					<th width="120">标题</th>
					<th>发布者</th>
					<th width="100">发布日期</th>
					<th width="150">操作</th>
				</tr>
			</thead>
			<tbody>
	    	<c:forEach var="ai" items="${qr.list}" varStatus="var">
	        	<tr target="sid_user" rel="${ai.id}">
	        		<td>${(qr.pager.pageNumber-1)*qr.pager.pageSize+var.index+1 }</td>
		        	<td><a href="${ctx }/admin/articleinfo/showArticleInfo.shtml?id=${ai.id}" target="navTab" rel="articleshow"><c:out value="${ai.title}" /></a></td>
		        	<td>${ai.addUser.name}</td>
		        	<td>(<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${ai.addDate}" />)</td>
		        	<td><a href="${ctx }/admin/articleinfo/showArticleInfo.shtml?id=${ai.id}&e=1" target="navTab" rel="articleshow">编辑</a></td>
	        	</tr>
	        </c:forEach>
			</tbody>
		</table>	
	    <div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select class="combox" name="numPerPage" id="shownumPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
					<option value="2">2</option>
					<option value="10">10</option>
					<option value="20">20</option>
					<option value="50">50</option>
					<option value="100">100</option>
					<option value="200">200</option>
				</select>
				<span>条，共${qr.pager.recordCount}条</span>
			</div>			
		    <div class="pagination" targetType="navTab" totalCount="${qr.pager.recordCount}" numPerPage="${qr.pager.pageSize}" pageNumShown="${qr.pager.pageCount}" currentPage="${qr.pager.pageNumber}"></div>	
		</div>
	</div>
	<script type="text/javascript">
		$("#shownumPerPage").val('${qr.pager.pageSize}');
	</script>